details widget name

Widgets

Same cat chapters
  • Technical documentation: Site
Chapter details

The widgets are the building blocks of a page. Each leaf region node from the layout of the page may contain an ordered list of widgets (widget references). The order of the widgets in the region is important for the rendering. There are different kinds of widgets. Each type of widget is designed to display specific data. Some of them contain their data and others display dynamic data, text mining results, navigations, etc. Widgets are used anywhere within i-Publisher and the concept is that no check for their type should be performed. For instance, if we want to know whether certain widget type is suitable to provide SEO description metadata, we have to adapt it to a certain interface, in our example this would be the ISEOSuitableForDescriptionWidgetsProvider interface. The adapted value would tell us if the widget is suitable and, in our case, provide some GUI components for creating new widgets of the given type. There are only two types of widgets suitable to provide description metadata but in order to stick to the plugin concept we are not allowed to reference them directly by type.

In this sense, there are many interfaces each widget plugin should implement. There are two groups of interfaces – the ones used only in the business services and those used in the GUI. Here is the list of the most important business ones:

  • IWidgetProxy – the interface of the widget proxy;

  • IWidget – the main interface for the widgets business object. This is the interface each widget bean should implement. The abstract AWidget implements some common properties each widget bean should have;

  • ISpecificWidgetManageService – the service managing the specific widget type.

  • IWidgetPreviewInformationProvider – provide some images and labels used mainly in the GUI, but not only there;

  • IExportProvider – the specific export provider;

  • IImportProvider – the specific import provider;

  • IEntityXmlProvider – create XML representation of the widget. There is an abstract WidgetEntityXmlProvider for exporting the common widget properties;

  • IEntityXmlParser – create widget by parsing the exported XML data. There is an abstract WidgetEntityXmlParser for parsing the common widget properties;

 

One of the most important GUI interfaces to be implemented are:

  • IWidgetEditorProvider – adapt a widget bean to this class to get the widget's editor;

  • IAddWidgetProvider – provides the buttons for adding new widgets in a selected region. These buttons open the widget editor for the new widget.

  • IWidgetRenderableItem – adapt IWidgetProxy to this class to get the button for adding specific widget type.

 

The most important interfaces to be adapted:

  • IBeanProvider – adapt IWidgetProxy to get the bean;

  • IWidgetProxyService – adapt String(widget type) to the get the widget bean;

  • ISpecificWidgetTextProvider - adapt IWidgetProxy to configure what part of the widget's content (text only) will be indexed by the lucene service.

  • IExportProvider – adapt IWidget to the specific export provider;

  • IImportProvider – adapt IWidget to the specific import provider;

     

The the main collective service for widgets is the IWidgetManagementService . This service manages the ISpecificWidgetManageService services and decides which service/services to call depending on the operation chosen and the type of the arguments. When obtaining a list of widgets, they might be not completely loaded due to performance and speed issues.

 

There are 24 different widgets. Most of them are common widgets, i.e. one can create, manage, reuse and delete these widgets. There is one system type of widgets – the template ones.

  1. Text widget (ISimpleTextWidget) – this kind of widget displays manually assigned static text. The content of the widget(the text) should be provided in all website languages. If not provided for a certain language, nothing will be displayed when the site is requested with in corresponding language. Content is stored in IContentText objects – one for each language. The content for each language should be loaded manually.

  2. Image widget (IImageWidget) – this kind of widget displays manually uploaded static image.

  3. Media widget (IMediaWidget) – contains manually uploaded static media files displayed in a player. Different types of media files may be uploaded – videos, images, music, etc. This widget renders as a jquery media player. This player contains a playlist with all uploaded files and some playing controls different for each media type. Depending on the file uploaded the site user will see video, hear music, etc.

  4. Attachment widget (IFileUploadWidget) – this kind of widget contains manually uploaded list of various static documents. This widget renders as a list of documents represented by links ready to be downloaded.

  5. Language switcher (ILanguageSwitcherWidget) – used to switch between the languages supported by a certain website, i.e. to change the language the site is requested in.

  6. Search box (ISearchWidget) – provide search box for searching website's content. One can configure the search widget to search only through selected types of dynamic content, i.e. content types. Some static content searhable by default. What part of the content is searchable is determined by the ISpecificWidgetTextProvider interface.

  7. Navigation widget (INavigationWidget) – this widget is designed to show complicated tree structures like the navigation and categorization trees. This widget have two possible visualizations – list or tree. When list visualization is selected the tree renders as an ordered HTML list – with ul and li tags nested in each other to represent the tree structure. This structure may either be styled by a jquery plugin(some effects are added as well) or by the theme with pure CSS. The tree visualization always uses jquery to render the tree. This visualization allows asynchronous loading of the inner tree branches.

  8. Translation widget (ITranslationWidget) – this widget allows site users to translate some of the page content by the automatic translation service. The widget renders as a dropdown menu containing languages to which the content of the page can be translated. The set of displayed languages is determined by the widget's configurations and the capabilities of the IAutomaticTranslationService. Not all language pairs are supported by this language service.

    When a language of this dropdown is selected the page is requested again this time with an additional “tlng”parameter – the language the content should be translated into. The actual translation happens from the request language to the “tlng” language upon rendering.

  9. Login form widget (IUserLoginWidget) – this widget renders as a log in form allowing site users to log in. When there is an already logged user, the widget is displayed as a log out button. This widgets sends requests to the LoginServlet and LogoutServlet upon log in and log out actions respectively. In the LoginServlet the ISecurityInfo information of the current user is put into the session. The LogoutServlet the user session is invalidated. Both servlets send cookies to the user.

  10. Registration form widget (IUserRegistrationWidget) – provides a registration form for creating new site users. The widget sends a request to the RegistrationServlet where the new user is created and a confirmation e-mail (IEMail) is send to him by the IEMailProvider service.

  11. Classification widget (IClassificationWidget) – displays how the selected content item is classified. Which is the selected content item is determined by the “ci” request parameter.

  12. Edit classification widget (IClassificationEditingWidget) – display a form for editing content item's classification. Again the selected content item is determined by the “ci” request parameter. Site users can choose categories (nodes) from various trees, both categorization and text mining, and assign them to the content item. This is done with jquery. The widgets sends asynchronous ajax requests to the EditClassificationServlet. The EditClassificationFilter is applied to manage the session.

  13. Edit Content (IContentEditingWidget) – displayed as a form for editing specific content item determined by the “ci” request parameter. The bundles for this widget start with com.tetracom.atlas.widget.content.editing. This widgets uses the content editing website functionality to determine how the form would be organized. Asynchronous ajax requests are send to various servlets. The EditServlet is used for creating and editing content items, the DeleteServlet – when deleting items, AutoTextServlet – sends the selected item to be processed by the text mining services. All servlets extend the AEditServlet abstract servlet. A filter is used to manage the session – EditFilter.

  14. Edit User Classification (IUserClassificationEditingWidget) – for editing website users' classification trees. This widget's bundles start with com.tetracom.atlas.widget.user.classification.editing. The user classification tree is displayed using jquery and some advanced editing controls are applied.

  15. List widget (IListWidget) – displays a lists of content items. This is the most complex widget created so far. There are a lot of bundles connected with this entity placed in different packages. Here are some of the most important ones:

  • com.tetracom.atlas.widget.list – this is the main list widget entity package. All other package contain list's subentities or addons.

  • com.tetracom.atlas.widget.mode – contains some common mode interfaces. Currently, the list is the only widget that has different modes – fragments and table.

  • com.tetracom.atlas.widget.mode.fragments – here are the bundles for the classic fragments list visualization. There are different types of fragments. All of them are located in different subpackages of this package.

  • com.tetracom.atlas.widget.table – here are located the bundles for the table visulaization.

  • com.tetracom.atlas.widget.web.abstr – here is located the list and details GUI data tab.

  • com.tetracom.atlas.widget.list.header – contains some collective bundles for the header attributes of the list. The other bundles are scattered throughout the workspace and collected via adapters.

  • com.tetracom.atlas.widget.lists.order – contains the collective order bundles.

  • com.tetracom.atlas.widget.sorting – here are the bundles for the sorting part of the order.

  • com.tetracom.atlas.widget.grouping – the bundles for the grouping part of the order.

  • com.tetracom.atlas.widget.paging – contains the bundles for the paiging.

  1. Details widget (IDetailsWidget) – display the details of a single content item. The main bundles for the widget entity are located in the com.tetracom.atlas.widget.details package. The details widget uses the bundles for the fragments visualization.

  2. Text mining statistics widget (ITmStatisticsWidget) - display the text mining statistical information for a content item:when the item was sent for processing, in which languages, when the item was processed, when the processed data was stored in the database. The main bundles for the widget entity are located in the com.tetracom.atlas.widget.tm.statistics package.

  3. Cluster widget (IClusterWidget) - provides the user with the ability to group their content based on the text mining excerpts from the processed content items. The groups are created automatically and currently they can not be edited. The main bundles for the widget entity are located in the com.tetracom.atlas.widget.cluster package. 

  4. Content import widget (IContentImportWidget) - allows the user to import multiple content items from an archive. The main bundles for the widget entity are located in the com.tetracom.atlas.widget.content.imp package.  

The following widgets are designed to display the results of the text mining analysis for a specific content item. They use the “ci”   request parameter to determine the content item.

  1. Important Phrases;

  2. Named Entities;

  3. Similar documents ;

  4. Summary;

  5. Template – this is not an ordinary widget and cannot be created or reused like other widgets. These widgets are system ones and are designed to contain other widgets. Each template widget may contain only a specific kind of ordinary widget. The template widgets can be seen as a placeholders for other widgets. Thus the page may be organized and styled even before widgets are created. Template widgets contain some styles and metadata that would be applied to the widget-content.